package com.pz.cloud.framework.base.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import javax.persistence.Transient;

/**
 * 分页model
 * @author 3hmzz
 *
 */
@Data
public class Pageable {
    @Transient
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    @TableField(exist = false)
    protected Integer pageNo = 1;
    @Transient
    @TableField(exist = false)
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    protected Integer pageSize = 15;

    @Transient
    @TableField(exist = false)
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private Boolean paging = true;//标记是否分页，默认为是

    public Pageable(){

    }
    public Pageable(Integer pageNo, Integer pageSize){
        this.pageNo = pageNo;
        this.pageSize = pageSize;
    }
}
